﻿//********************************************************************************//
//创建日期：<创建日期，2010-08-02>
//创建作者：<王一飞，wangyifei@shanghai3h.com>
//功能说明：WTB_JIESHUIXX实体层次
//********************************************************************************//
#region Entity
namespace Entity
{
    using System;
    using System.Xml;
    using System.Collections.Generic;

    [Serializable()]
    public class WTB_JIESHUIXX
    {

        private int m_bt_id;
        /// <summary>
        /// ID自增长，禁止关联
        /// </summary>
        public int ID { get { return m_bt_id; } set { m_bt_id = value; } }

        private string m_str_s_zhubiaobh;
        /// <summary>
        /// 主表编号
        /// </summary>
        public string S_ZHUBIAOBH { get { return m_str_s_zhubiaobh; } set { m_str_s_zhubiaobh = value; } }

        private string m_str_incident_id;
        /// <summary>
        /// 申请单唯一ID
        /// </summary>
        public string INCIDENT_ID { get { return m_str_incident_id; } set { m_str_incident_id = value; } }

        private string m_str_s_type;
        /// <summary>
        /// 类型（居民住宅、单位接水）
        /// </summary>
        public string S_TYPE { get { return m_str_s_type; } set { m_str_s_type = value; } }

        private string m_str_contact_address;
        /// <summary>
        /// 联系地址
        /// </summary>
        public string CONTACT_ADDRESS { get { return m_str_contact_address; } set { m_str_contact_address = value; } }

        private string m_str_s_project;
        /// <summary>
        /// 项目名称
        /// </summary>
        public string S_PROJECT { get { return m_str_s_project; } set { m_str_s_project = value; } }

        private string m_str_contact_person;
        /// <summary>
        /// 经办人
        /// </summary>
        public string CONTACT_PERSON { get { return m_str_contact_person; } set { m_str_contact_person = value; } }

        private string m_str_ysxqsc;
        /// <summary>
        /// 用水需求（生活/生产）
        /// </summary>
        public string YSXQSC { get { return m_str_ysxqsc; } set { m_str_ysxqsc = value; } }

        private string m_str_ysxqxf;
        /// <summary>
        /// 用水需求（消防）
        /// </summary>
        public string YSXQXF { get { return m_str_ysxqxf; } set { m_str_ysxqxf = value; } }

        private string m_str_overall_floorage;
        /// <summary>
        /// 总建筑面积
        /// </summary>
        public string OVERALL_FLOORAGE { get { return m_str_overall_floorage; } set { m_str_overall_floorage = value; } }

        private string m_str_qyzjlx;
        /// <summary>
        /// 企业证件类型
        /// </summary>
        public string QYZJLX { get { return m_str_qyzjlx; } set { m_str_qyzjlx = value; } }

        private string m_str_qyzjbm;
        /// <summary>
        /// 企业证件编码
        /// </summary>
        public string QYZJBM { get { return m_str_qyzjbm; } set { m_str_qyzjbm = value; } }

        private string m_str_frxm;
        /// <summary>
        /// 法人姓名
        /// </summary>
        public string FRXM { get { return m_str_frxm; } set { m_str_frxm = value; } }

        private string m_str_frsfzhm;
        /// <summary>
        /// 法人身份证号
        /// </summary>
        public string FRSFZHM { get { return m_str_frsfzhm; } set { m_str_frsfzhm = value; } }

        private string m_str_ydxz;
        /// <summary>
        /// 用地性质
        /// </summary>
        public string YDXZ { get { return m_str_ydxz; } set { m_str_ydxz = value; } }

        private string m_str_build_type;
        /// <summary>
        /// 建筑物类型
        /// </summary>
        public string BUILD_TYPE { get { return m_str_build_type; } set { m_str_build_type = value; } }

        private string m_str_wygz;
        /// <summary>
        /// 单位名称（盖章）
        /// </summary>
        public string WYGZ { get { return m_str_wygz; } set { m_str_wygz = value; } }

        private string m_str_khxz;
        /// <summary>
        /// 客户性质
        /// </summary>
        public string KHXZ { get { return m_str_khxz; } set { m_str_khxz = value; } }

        private string m_str_sqlb;
        /// <summary>
        /// 申请类别
        /// </summary>
        public string SQLB { get { return m_str_sqlb; } set { m_str_sqlb = value; } }

        private int? m_bt_i_beiyong1;
        /// <summary>
        /// 
        /// </summary>
        public int? I_BEIYONG1 { get { return m_bt_i_beiyong1; } set { m_bt_i_beiyong1 = value; } }

        private int? m_bt_i_beiyong2;
        /// <summary>
        /// 
        /// </summary>
        public int? I_BEIYONG2 { get { return m_bt_i_beiyong2; } set { m_bt_i_beiyong2 = value; } }

        private int? m_bt_i_beiyong3;
        /// <summary>
        /// 
        /// </summary>
        public int? I_BEIYONG3 { get { return m_bt_i_beiyong3; } set { m_bt_i_beiyong3 = value; } }

        private string m_str_s_beiyong1;
        /// <summary>
        /// 
        /// </summary>
        public string S_BEIYONG1 { get { return m_str_s_beiyong1; } set { m_str_s_beiyong1 = value; } }

        private string m_str_s_beiyong2;
        /// <summary>
        /// 
        /// </summary>
        public string S_BEIYONG2 { get { return m_str_s_beiyong2; } set { m_str_s_beiyong2 = value; } }

        private string m_str_s_beiyong3;
        /// <summary>
        /// 
        /// </summary>
        public string S_BEIYONG3 { get { return m_str_s_beiyong3; } set { m_str_s_beiyong3 = value; } }

        private DateTime? m_DT_d_beiyong1;
        /// <summary>
        /// 
        /// </summary>
        public DateTime? D_BEIYONG1 { get { return m_DT_d_beiyong1; } set { m_DT_d_beiyong1 = value; } }

        private DateTime? m_DT_d_beiyong2;
        /// <summary>
        /// 
        /// </summary>
        public DateTime? D_BEIYONG2 { get { return m_DT_d_beiyong2; } set { m_DT_d_beiyong2 = value; } }

        private DateTime? m_DT_d_beiyong3;
        /// <summary>
        /// 
        /// </summary>
        public DateTime? D_BEIYONG3 { get { return m_DT_d_beiyong3; } set { m_DT_d_beiyong3 = value; } }

        #region 2020/01/08添加
        private string m_str_fczhm;
        /// <summary>
        /// 房产证号码
        /// </summary>
        public string FCZHM { get { return m_str_fczhm; } set { m_str_fczhm = value; } }

        private string m_str_fensuo;
        /// <summary>
        /// 分所
        /// </summary>
        public string FENSUO { get { return m_str_fensuo; } set { m_str_fensuo = value; } }

        private string m_str_xzq;
        /// <summary>
        /// 行政区
        /// </summary>
        public string XZQ { get { return m_str_xzq; } set { m_str_xzq = value; } }

        private string m_str_jdz;
        /// <summary>
        /// 街道镇
        /// </summary>
        public string JDZ { get { return m_str_jdz; } set { m_str_jdz = value; } }

        private string m_str_apply_memo;
        /// <summary>
        /// 申请说明
        /// </summary>
        public string APPLY_MEMO { get { return m_str_apply_memo; } set { m_str_apply_memo = value; } }
        #endregion

        public WTB_JIESHUIXX()
        {
        }
    }
}
#endregion
#region EntityProcess
namespace Access.BLL
{
    using System;
    using System.Data;
    //using System.Data.OracleClient;
    using Entity;
    using System.Configuration;
    using System.Data.Common;
    using Platform.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    using Oracle.DataAccess;
    public class WTB_JIESHUIXXProcess
    {
        #region Field
        protected string conn;
        #endregion
        #region Construction
        public WTB_JIESHUIXXProcess() { conn = Platform.Configuration.ConfigHelper.BusinessConnString; }
        #endregion
        #region public

        /// <summary>
        /// 根据WTB_JIESHUIXX实体添加或者修改WTB_JIESHUIXX信息
        /// </summary>
        public bool InsertOrUpdate(WTB_JIESHUIXX WTB_JIESHUIXX, OracleTransaction Transaction)
        {
            if (WTB_JIESHUIXX.ID == 0)
            {
                InsertWTB_JIESHUIXX(WTB_JIESHUIXX, Transaction);
            }
            else
            {
                UpdateWTB_JIESHUIXX(WTB_JIESHUIXX, Transaction);
            }
            return WTB_JIESHUIXX.ID == 0 ? false : true;
        }

        /// <summary>
        /// 根据WTB_JIESHUIXX实体添加或修改WTB_JIESHUIXX信息
        /// </summary>
        public bool InsertOrUpdate(WTB_JIESHUIXX WTB_JIESHUIXX)
        {
            return InsertOrUpdate(WTB_JIESHUIXX, null);
        }



        /// <summary>
        /// 根据WTB_JIESHUIXX主键删除WTB_JIESHUIXX信息
        /// </summary>
        /// <param name="ID"></param>
        public bool DeleteWTB_JIESHUIXX(int ID, OracleTransaction Transaction)
        {
            string spName = "CS_DelWTB_JIESHUIXX";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = ID;
            int result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }

        /// <summary>
        /// 根据WTB_JIESHUIXX主键删除WTB_JIESHUIXX信息
        /// </summary>
        /// <param name="ID"></param>
        public bool DeleteWTB_JIESHUIXX(int ID)
        {
            return DeleteWTB_JIESHUIXX(ID, null);
        }

        /// <summary>
        /// 根据条件删除WTB_JIESHUIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(Oracle语句)不带where</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>如果删除成功，返回true,否则返回fals</returns>
        public bool DeleteWTB_JIESHUIXXesDynamic(string WhereClause, OracleTransaction Transaction)
        {
            string spName = "CS_DelWTB_JIESHUIXXesDyn";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = WhereClause;
            int result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }

        /// <summary>
        /// 根据条件删除WTB_JIESHUIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(Oracle语句)不带where</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>如果删除成功，返回true,否则返回fals</returns>
        public bool DeleteWTB_JIESHUIXXesDynamic(string WhereClause)
        {
            return DeleteWTB_JIESHUIXXesDynamic(WhereClause, null);
        }

        /// <summary>
        /// 根据WTB_JIESHUIXX主键选择WTB_JIESHUIXX信息
        /// </summary>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>WTB_JIESHUIXX信息</returns>
        public WTB_JIESHUIXX SelectWTB_JIESHUIXX(int ID, OracleTransaction Transaction)
        {
            string spName = "CS_SelWTB_JIESHUIXX";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = ID;
            OracleDataReader rd;
            if (Transaction == null)
                rd = OracleHelper.ExecuteReader(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                rd = OracleHelper.ExecuteReader((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (rd.Read())
            {
                WTB_JIESHUIXX WTB_JIESHUIXX = PopulateWTB_JIESHUIXX(rd);
                rd.Close();
                return WTB_JIESHUIXX;
            }
            else
                return null;
        }

        /// <summary>
        /// 根据WTB_JIESHUIXX主键选择WTB_JIESHUIXX信息
        /// </summary>
        /// <returns>WTB_JIESHUIXX信息</returns>
        public WTB_JIESHUIXX SelectWTB_JIESHUIXX(int ID)
        {
            return SelectWTB_JIESHUIXX(ID, null);
        }

        /// <summary>
        /// 选择所有WTB_JIESHUIXX信息
        /// </summary>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>所有WTB_JIESHUIXX信息</returns>
        public DataTable SelectWTB_JIESHUIXXesAll(OracleTransaction Transaction)
        {
            string spName = "CS_SelWTB_JIESHUIXXesAll";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            else
                return null;
        }

        /// <summary>
        /// 选择所有WTB_JIESHUIXX信息
        /// </summary>
        /// <returns>所有WTB_JIESHUIXX信息</returns>
        public DataTable SelectWTB_JIESHUIXXesAll()
        {
            return SelectWTB_JIESHUIXXesAll(null);
        }

        /// <summary>
        /// 根据条件选择WTB_JIESHUIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>WTB_JIESHUIXX信息</returns>
        public DataTable SelectWTB_JIESHUIXXesDynamic(string WhereClause, string OrderByExpression, OracleTransaction Transaction)
        {
            string spName = "CS_SelWTB_JIESHUIXXesDyn";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = string.IsNullOrEmpty(WhereClause.Trim()) ? "1=1" : WhereClause;
            storedParams[1].Value = OrderByExpression;
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            else
                return null;
        }


        /// <summary>
        /// 根据条件选择WTB_JIESHUIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <returns>WTB_JIESHUIXX信息</returns>
        public DataTable SelectWTB_JIESHUIXXesDynamic(string WhereClause, string OrderByExpression)
        {
            return SelectWTB_JIESHUIXXesDynamic(WhereClause, OrderByExpression, null);
        }



        /// <summary>
        /// 根据条件选择WTB_JIESHUIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页数</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>WTB_JIESHUIXX信息</returns>
        public DataTable SelectWTB_JIESHUIXXesDynamic(string WhereClause, string OrderByExpression, int PageIndex, int PageSize, OracleTransaction Transaction)
        {
            string spName = "CS_SelWTB_JIESHUIXXesDynPaged";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = string.IsNullOrEmpty(WhereClause.Trim()) ? "1=1" : WhereClause;
            storedParams[1].Value = OrderByExpression;
            storedParams[2].Value = PageIndex;
            storedParams[3].Value = PageSize;
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            else
                return null;
        }


        /// <summary>
        /// 根据条件选择WTB_JIESHUIXX信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页数</param>
        /// <returns>WTB_JIESHUIXX信息</returns>
        public DataTable SelectWTB_JIESHUIXXesDynamic(string WhereClause, string OrderByExpression, int PageIndex, int PageSize)
        {
            return SelectWTB_JIESHUIXXesDynamic(WhereClause, OrderByExpression, PageIndex, PageSize, null);
        }

        /// <summary>
        ///根据条件更新WTB_JIESHUIXX字段
        /// </summary>
        /// <returns>受影响行数</returns>
        public int UpdateWTB_JIESHUIXXesDynamic(string UpdateValue, string WhereClause, OracleTransaction Transaction)
        {
            int result = 0;
            if (UpdateValue == "" || WhereClause == "")
            {
                return 0;
            }
            string spName = "CS_UpdWTB_JIESHUIXXDyn";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            DataSet ds = null;
            storedParams[0].Value = UpdateValue;
            storedParams[1].Value = WhereClause;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            result = Convert.ToInt32(storedParams[2].Value);
            return result;
        }

        /// <summary>
        ///根据条件更新WTB_JIESHUIXX字段
        /// </summary>
        /// <returns>受影响行数</returns>
        public int UpdateWTB_JIESHUIXXesDynamic(string UpdateValue, string WhereClause)
        {
            return UpdateWTB_JIESHUIXXesDynamic(UpdateValue, WhereClause, null);
        }


        #endregion
        #region Private

        private int InsertWTB_JIESHUIXX(WTB_JIESHUIXX WTB_JIESHUIXX, OracleTransaction Transaction)
        {
            string spName = "CS_InsWTB_JIESHUIXX";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = WTB_JIESHUIXX.S_ZHUBIAOBH;
            storedParams[1].Value = WTB_JIESHUIXX.INCIDENT_ID;
            storedParams[2].Value = WTB_JIESHUIXX.S_TYPE;
            storedParams[3].Value = WTB_JIESHUIXX.CONTACT_ADDRESS;
            storedParams[4].Value = WTB_JIESHUIXX.S_PROJECT;
            storedParams[5].Value = WTB_JIESHUIXX.CONTACT_PERSON;
            storedParams[6].Value = WTB_JIESHUIXX.YSXQSC;
            storedParams[7].Value = WTB_JIESHUIXX.YSXQXF;
            storedParams[8].Value = WTB_JIESHUIXX.OVERALL_FLOORAGE;
            storedParams[9].Value = WTB_JIESHUIXX.QYZJLX;
            storedParams[10].Value = WTB_JIESHUIXX.QYZJBM;
            storedParams[11].Value = WTB_JIESHUIXX.FRXM;
            storedParams[12].Value = WTB_JIESHUIXX.FRSFZHM;
            storedParams[13].Value = WTB_JIESHUIXX.YDXZ;
            storedParams[14].Value = WTB_JIESHUIXX.BUILD_TYPE;
            storedParams[15].Value = WTB_JIESHUIXX.WYGZ;
            storedParams[16].Value = WTB_JIESHUIXX.KHXZ;
            storedParams[17].Value = WTB_JIESHUIXX.SQLB;
            storedParams[18].Value = WTB_JIESHUIXX.I_BEIYONG1;
            storedParams[19].Value = WTB_JIESHUIXX.I_BEIYONG2;
            storedParams[20].Value = WTB_JIESHUIXX.I_BEIYONG3;
            storedParams[21].Value = WTB_JIESHUIXX.S_BEIYONG1;
            storedParams[22].Value = WTB_JIESHUIXX.S_BEIYONG2;
            storedParams[23].Value = WTB_JIESHUIXX.S_BEIYONG3;
            storedParams[24].Value = WTB_JIESHUIXX.D_BEIYONG1;
            storedParams[25].Value = WTB_JIESHUIXX.D_BEIYONG2;
            storedParams[26].Value = WTB_JIESHUIXX.D_BEIYONG3;
            int result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            WTB_JIESHUIXX.ID = Convert.ToInt32(storedParams[27].Value);
            return result;
        }
        private bool UpdateWTB_JIESHUIXX(WTB_JIESHUIXX WTB_JIESHUIXX, OracleTransaction Transaction)
        {
            string spName = "CS_UpdWTB_JIESHUIXX";
            OracleParameter[] storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = WTB_JIESHUIXX.S_ZHUBIAOBH;
            storedParams[1].Value = WTB_JIESHUIXX.INCIDENT_ID;
            storedParams[2].Value = WTB_JIESHUIXX.S_TYPE;
            storedParams[3].Value = WTB_JIESHUIXX.CONTACT_ADDRESS;
            storedParams[4].Value = WTB_JIESHUIXX.S_PROJECT;
            storedParams[5].Value = WTB_JIESHUIXX.CONTACT_PERSON;
            storedParams[6].Value = WTB_JIESHUIXX.YSXQSC;
            storedParams[7].Value = WTB_JIESHUIXX.YSXQXF;
            storedParams[8].Value = WTB_JIESHUIXX.OVERALL_FLOORAGE;
            storedParams[9].Value = WTB_JIESHUIXX.QYZJLX;
            storedParams[10].Value = WTB_JIESHUIXX.QYZJBM;
            storedParams[11].Value = WTB_JIESHUIXX.FRXM;
            storedParams[12].Value = WTB_JIESHUIXX.FRSFZHM;
            storedParams[13].Value = WTB_JIESHUIXX.YDXZ;
            storedParams[14].Value = WTB_JIESHUIXX.BUILD_TYPE;
            storedParams[15].Value = WTB_JIESHUIXX.WYGZ;
            storedParams[16].Value = WTB_JIESHUIXX.KHXZ;
            storedParams[17].Value = WTB_JIESHUIXX.SQLB;
            storedParams[18].Value = WTB_JIESHUIXX.I_BEIYONG1;
            storedParams[19].Value = WTB_JIESHUIXX.I_BEIYONG2;
            storedParams[20].Value = WTB_JIESHUIXX.I_BEIYONG3;
            storedParams[21].Value = WTB_JIESHUIXX.S_BEIYONG1;
            storedParams[22].Value = WTB_JIESHUIXX.S_BEIYONG2;
            storedParams[23].Value = WTB_JIESHUIXX.S_BEIYONG3;
            storedParams[24].Value = WTB_JIESHUIXX.D_BEIYONG1;
            storedParams[25].Value = WTB_JIESHUIXX.D_BEIYONG2;
            storedParams[26].Value = WTB_JIESHUIXX.D_BEIYONG3;
            storedParams[27].Value = WTB_JIESHUIXX.ID;
            int result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery((OracleTransaction)Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }


        private WTB_JIESHUIXX PopulateWTB_JIESHUIXX(IDataReader dr)
        {
            WTB_JIESHUIXX WTB_JIESHUIXX = new WTB_JIESHUIXX();
            WTB_JIESHUIXX.ID = dr["ID"] == DBNull.Value ? (int)0 : (int)dr["ID"];
            WTB_JIESHUIXX.S_ZHUBIAOBH = dr["S_ZHUBIAOBH"] == DBNull.Value ? null : (string)dr["S_ZHUBIAOBH"];
            WTB_JIESHUIXX.INCIDENT_ID = dr["INCIDENT_ID"] == DBNull.Value ? null : (string)dr["INCIDENT_ID"];
            WTB_JIESHUIXX.S_TYPE = dr["S_TYPE"] == DBNull.Value ? null : (string)dr["S_TYPE"];
            WTB_JIESHUIXX.CONTACT_ADDRESS = dr["CONTACT_ADDRESS"] == DBNull.Value ? null : (string)dr["CONTACT_ADDRESS"];
            WTB_JIESHUIXX.S_PROJECT = dr["S_PROJECT"] == DBNull.Value ? null : (string)dr["S_PROJECT"];
            WTB_JIESHUIXX.CONTACT_PERSON = dr["CONTACT_PERSON"] == DBNull.Value ? null : (string)dr["CONTACT_PERSON"];
            WTB_JIESHUIXX.YSXQSC = dr["YSXQSC"] == DBNull.Value ? null : (string)dr["YSXQSC"];
            WTB_JIESHUIXX.YSXQXF = dr["YSXQXF"] == DBNull.Value ? null : (string)dr["YSXQXF"];
            WTB_JIESHUIXX.OVERALL_FLOORAGE = dr["OVERALL_FLOORAGE"] == DBNull.Value ? null : (string)dr["OVERALL_FLOORAGE"];
            WTB_JIESHUIXX.QYZJLX = dr["QYZJLX"] == DBNull.Value ? null : (string)dr["QYZJLX"];
            WTB_JIESHUIXX.QYZJBM = dr["QYZJBM"] == DBNull.Value ? null : (string)dr["QYZJBM"];
            WTB_JIESHUIXX.FRXM = dr["FRXM"] == DBNull.Value ? null : (string)dr["FRXM"];
            WTB_JIESHUIXX.FRSFZHM = dr["FRSFZHM"] == DBNull.Value ? null : (string)dr["FRSFZHM"];
            WTB_JIESHUIXX.YDXZ = dr["YDXZ"] == DBNull.Value ? null : (string)dr["YDXZ"];
            WTB_JIESHUIXX.BUILD_TYPE = dr["BUILD_TYPE"] == DBNull.Value ? null : (string)dr["BUILD_TYPE"];
            WTB_JIESHUIXX.WYGZ = dr["WYGZ"] == DBNull.Value ? null : (string)dr["WYGZ"];
            WTB_JIESHUIXX.KHXZ = dr["KHXZ"] == DBNull.Value ? null : (string)dr["KHXZ"];
            WTB_JIESHUIXX.SQLB = dr["SQLB"] == DBNull.Value ? null : (string)dr["SQLB"];
            WTB_JIESHUIXX.I_BEIYONG1 = dr["I_BEIYONG1"] == DBNull.Value ? null : (int?)dr["I_BEIYONG1"];
            WTB_JIESHUIXX.I_BEIYONG2 = dr["I_BEIYONG2"] == DBNull.Value ? null : (int?)dr["I_BEIYONG2"];
            WTB_JIESHUIXX.I_BEIYONG3 = dr["I_BEIYONG3"] == DBNull.Value ? null : (int?)dr["I_BEIYONG3"];
            WTB_JIESHUIXX.S_BEIYONG1 = dr["S_BEIYONG1"] == DBNull.Value ? null : (string)dr["S_BEIYONG1"];
            WTB_JIESHUIXX.S_BEIYONG2 = dr["S_BEIYONG2"] == DBNull.Value ? null : (string)dr["S_BEIYONG2"];
            WTB_JIESHUIXX.S_BEIYONG3 = dr["S_BEIYONG3"] == DBNull.Value ? null : (string)dr["S_BEIYONG3"];
            WTB_JIESHUIXX.D_BEIYONG1 = dr["D_BEIYONG1"] == DBNull.Value ? null : (DateTime?)dr["D_BEIYONG1"];
            WTB_JIESHUIXX.D_BEIYONG2 = dr["D_BEIYONG2"] == DBNull.Value ? null : (DateTime?)dr["D_BEIYONG2"];
            WTB_JIESHUIXX.D_BEIYONG3 = dr["D_BEIYONG3"] == DBNull.Value ? null : (DateTime?)dr["D_BEIYONG3"];
            return WTB_JIESHUIXX;
        }


        private void AddRowNumber(DataTable dt)
        {
            dt.Columns.Add(new DataColumn("RowNumber", typeof(int)));
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dt.Rows[i][dt.Columns.Count - 1] = i + 1;
            }
        }
        #endregion
    }
}
#endregion